//
//  ViewController.m
//  9-13
//
//  Created by mac on 16/9/13.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIButton *btn;
@property (weak, nonatomic) IBOutlet UILabel *lab;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *atv;
@property (weak, nonatomic) IBOutlet UISlider *slider1;
@property (weak, nonatomic) IBOutlet UISlider *slider2;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (IBAction)onChanged:(id)sender
{
    if(_slider1.value == 0)
    {
        _slider2.value = 1;
    }
    else _slider2.value = 0;
    
}

- (IBAction)onChanged2:(id)sender
{
    if(_slider2.value == 1)
    {
        _slider1.value = 0;
    }
    else _slider1.value = 1;
}

- (IBAction)onSwich:(UISwitch *)sender {
    if(sender.isOn)
    {
        [_atv startAnimating];
    }
    else{[_atv stopAnimating];}
}

- (IBAction)onClickDown:(id)sender {
    self.btn.backgroundColor = [UIColor greenColor];
    self.lab.text = @"你好";
}

- (IBAction)onClick:(id)sender {
    self.btn.backgroundColor = [UIColor  grayColor];
    self.lab.text = @"早上好";
  
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
